from django.test import TestCase
from django.test.client import Client

"""
Testira stranu za odabir igraca
"""
class Head2HeadChooserTestCase(TestCase):
    
    def setUp(self):
        pass

    def runTest(self):
        c = Client()
        c.login(username='kokan', password='123')
        
        response = c.get("/mdcs/head2head/")
        self.failIf(response == None)
        self.failIf(response.context == None)
        self.failUnlessEqual(len(response.context), 2)
        self.failIf(response.context[0]["users"] == None)
        
        users = response.context[0]["users"]
        self.failUnlessEqual(len(users), 12)